package org.jeecg.modules.analysis.graph.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 图谱历史记录
 * @Author: dingmengdi
 * @Date: 2025-10-13
 * @Version: V1.0
 */
@Data
@TableName("t_graph_history")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="图谱历史记录")
public class GraphHistory implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键ID")
    private String id;

    /** 创建人 */
    @Schema(description = "创建人")
    private String createBy;

    /** 创建日期 */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private Date createTime;

    /** 更新人 */
    @Schema(description = "更新人")
    private String updateBy;

    /** 更新日期 */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新日期")
    private Date updateTime;

    /** 所属部门 */
    @Schema(description = "所属部门")
    private String sysOrgCode;

    /** 核心专利ID */
    @Schema(description = "核心专利ID")
    private String patentId;

    /** 专利名称（冗余字段，方便展示） */
    @Schema(description = "专利名称")
    private String patentName;

    /** 关联类型 */
    @Schema(description = "关联类型：institution(申请机构)/inventor(发明人)/ipc(IPC分类)/technology(技术领域)")
    private String relationType;

    /** 访问次数 */
    @Schema(description = "访问次数")
    private Integer visitCount;
}

